package com.epro.dx.model;

import android.databinding.BaseObservable;
import android.databinding.Bindable;

import com.epro.dx.BR;

/**
 * 时间模型
 *
 * @author Zenglw
 * @version 1.0
 * @des 一个时间模型，用于获取当前的时间展示在AlarmActivity界面上,使用Databinding进行数据绑定，
 * 继承BaseObservable，然后在get方法上面添加注解@Bindable ，
 * 在set方法中添加方法notifyPropertyChanged（BR.对应的字段名），
 * 这样可以做到当数据DateMOdel的属性发生变化了，则布局也跟着变化。
 */

public class DateModel extends BaseObservable {
    private String hour;

    private String minute;
    private String month;
    private String day;
    private String weekday;

    public DateModel() {

    }

    @Bindable
    public String getHour() {
        return hour;
    }

    public void setHour(String hour) {
        this.hour = hour;
         notifyPropertyChanged(BR.hour);
    }

    @Bindable
    public String getMinute() {
        return minute;
    }

    public void setMinute(String minute) {
        this.minute = minute;
        notifyPropertyChanged(BR.minute);

    }

    @Bindable
    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
        notifyPropertyChanged(BR.month);

    }

    @Bindable
    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
        notifyPropertyChanged(BR.day);
    }

    @Bindable
    public String getWeekday() {
        return weekday;
    }

    public void setWeekday(String weekday) {
        this.weekday = weekday;
        notifyPropertyChanged(BR.weekday);
    }
}
